Chore: enhance MCP authentication flow with automatic resume and connection status updates - #701
Conversation
…ction status updates
🦋 Changeset detectedLatest commit: 2bc7df9 The changes in this PR will be included in the next version bump. This PR includes no changesetsWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 59c9401. Configure here.
…r handling and connection status management
…-is-completed-the-mcp
| const handleConnect = (serverId: string) => { | ||
| void handleAuthorize(serverId, isSuccess => { | ||
| if (isSuccess) { | ||
| const nextConnectedServerIds = new Set([...connectedServerIdsRef.current, serverId]); |
There was a problem hiding this comment.
Can we harden this flow and see if actually we are getting authenticated as true here?

Summary
Changes
How was this tested?
Checklist
pnpm build,pnpm test,pnpm typecheck,pnpm lint:ci, andpnpm format:checkpass locallypackages/trueforge-sdk,.github/fern/openapi/openapi.json,docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge.env.exampleupdated if configuration or behavior changedNote
Low Risk
UI and catalog MCP resume orchestration only; no auth backend or credential handling changes.
Overview
Improves the catalog MCP authentication prompt so users see per-server Connected state after a successful authorize, instead of always showing Connect.
When every pending server has connected, the chat automatically calls
resume(same as Continue) so the turn can proceed without an extra click. Continue shows a spinner and stays disabled while resume is in flight, and re-enables if resume fails so the user can retry. Pending server sets reset connection/resume state via a key on the catalog prompt.The shared
McpAuthPromptslot gains optionalconnectedServerIdsandcontinueLoadingprops for this UI. Non-catalog flows (auth URLs in a new tab) still use manual Continue unchanged.Tests cover auto-resume after all catalog connects, no resume on failed auth, and Continue retry after resume errors.
Reviewed by Cursor Bugbot for commit 2bc7df9. Bugbot is set up for automated code reviews on this repo. Configure here.